/* static/css/index.css */

/* General styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5; /* 备用背景颜色 */
    background-image: url('../image/backgrand.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    flex: 1;
}

nav {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul li {
    margin: 0 15px;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.main-content {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin: 20px;
}

.main-content h2 {
    color: #333;
}

.main-content p {
    color: #666;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.product {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    width: calc(25% - 40px); /* 调整每行显示的产品数量，这里设置为每行4个 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 10px;
    text-align: center;
}

.product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.product h3 {
    font-size: 1.2em;
    margin: 10px 0;
}

.product p {
    color: #f00;
    font-size: 1.1em;
}

.product form {
    margin-top: 10px;
}

.product form button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.product form button:hover {
    background-color: #555;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: auto;
    width: 100%;
}

footer p {
    margin: 0;
}

footer ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

footer ul li {
    margin: 0 15px;
}

footer ul li a {
    color: #fff;
    text-decoration: none;
}

footer ul li a:hover {
    text-decoration: underline;
}
